/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controladores;


import Entidades.Transportetransportista;
import java.util.List;

import logica.jpaControllers.TransportetransportistaJpaController;

/**
 *
 * @author USER
 */
public class CtrlTransportetransportista {

    /** Creates a new instance of CtrlABMArticulos */
    public CtrlTransportetransportista() {
    }
    //guarda articulo

    public void guardarTransportetransportista(Transportetransportista op) {
        TransportetransportistaJpaController ga = new TransportetransportistaJpaController();
        ga.create(op);
    }

    public void eliminarTransportetransportista(Transportetransportista op) throws Exception {
        TransportetransportistaJpaController ga = new TransportetransportistaJpaController();
        ga.destroy(op.getIdtransportetransportista());
    }

    public void modificarTransportetransportista(Transportetransportista op) throws Exception {
        TransportetransportistaJpaController ga = new TransportetransportistaJpaController();
        ga.edit(op);
    }

    public Transportetransportista buscarTransportetransportista_X_idTransportetransportista(int idtransportetransportista) {
        TransportetransportistaJpaController ga = new TransportetransportistaJpaController();
        return ga.findTransportetransportista(idtransportetransportista);

    }



    public List buscarTodosTransportetransportista() throws Exception {
        TransportetransportistaJpaController ga = new TransportetransportistaJpaController();
        return ga.findTransportetransportistaEntities();
    }

}
